Ext.define('extjs6test.view.core.DictItemGrid', {
    extend: 'extjs6test.view.base.BaseGrid',
    requires: ['extjs6test.view.base.BaseGrid'],
    alias: 'widget.dictitemgrid',
    initComponent: function () {
        var me = this;
        var itemStore = Ext.create("extjs6test.store.DictItem");
        Ext.apply(me, {
            store: itemStore,
            columns: [
                {
                    dataIndex: "display", text: "Display", flex: 1,
                    editor: {xtype: "textfield", allowBlank: false}
                },
                {
                    dataIndex: 'value', text: 'Value', flex: 1,
                    editor: {xtype: "textfield", allowBlank: false}
                },
                {dataIndex: "orderNum", text: "Order Number", flex: 1},
                {
                    dataIndex: "joinTime",
                    text: "Join Time",
                    xtype: 'datecolumn',
                    format: "Y-m-d H:i:s",
                    flex: 1
                },
                {
                    dataIndex: "updateTime",
                    text: "Update Time",
                    xtype: 'datecolumn',
                    format: "Y-m-d H:i:s",
                    flex: 1
                }
            ],
            plugins: [{
                ptype: 'cellediting',
                clicksToEdit: 1
            }]
        });
        me.callParent(arguments);
    }
});
